package com.mj.jk.controller;

import com.mj.jk.pojo.query.DictTypeQuery;
import com.mj.jk.service.DictTypeService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/dictTypes")
public class DictTypeController {

    @Autowired
    private DictTypeService dictTypeService;

    @GetMapping("/list")
    public String list(DictTypeQuery query, Model model) {
        System.out.println("list");
        dictTypeService.list(query);
        model.addAttribute("query",query );
        return "pages/dictType";

    }
}
